<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<aside th:fragment="sidebar-fragment(path)" class="main-sidebar sidebar-dark-primary elevation-4">
    <!-- Brand Logo -->
    <a th:href="@{/}" class="brand-link">
        <img th:src="@{/static/user/dist/img/icon.png}" alt="ssm-cluster Logo" class="brand-image img-circle elevation-3"
             style="opacity: .8">
        <span class="brand-text font-weight-light">DreamLife</span>
    </a>
    <!-- Sidebar -->
    <div class="sidebar">
        <!-- Sidebar user panel (optional) -->
        <div class="user-panel mt-3 pb-3 mb-3 d-flex">
            <div class="image">
                <img th:src="@{/static/user/dist/img/avatar5.png}" class="img-circle elevation-2" alt="User Image">
            </div>
            <div class="info">
                <a id="sidebar-nickname" th:if="${session.loginUser!=null}" href="#" class="d-block"
                   th:text="${session.loginUser}"></a>
                <a th:if="${session.loginUser==null}" href="#" class="d-block">纯路人</a>
            </div>
        </div>
        <!-- Sidebar Menu -->
        <nav class="mt-2">
            <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
                data-accordion="false">
                <!-- Add icons to the links using the .nav-icon class
                     with font-awesome or any other icon font library -->
                <li class="nav-header">Dashboard</li>
                <li class="nav-item">
                    <a th:href="@{/user/home}" th:class="${path}=='home'?'nav-link active':'nav-link'">
                        <i class="nav-icon fa fa-dashboard"></i>
                        <p>
                            我的主页
                        </p>
                    </a>
                </li>
                <li class="nav-item">
                    <a th:href="@{/blog/archive}" th:class="${path}=='archive'?'nav-link active':'nav-link'">
                        <i class="nav-icon fa fa-dashboard"></i>
                        <p>
                            博客归档
                        </p>
                    </a>
                </li>
                <li class="nav-item">
                    <a th:href="@{/blog/edit}" th:class="${path}=='edit'?'nav-link active':'nav-link'">
                        <i class="nav-icon fa fa fa-pencil-square-o"></i>
                        <p>
                            发布博客
                        </p>
                    </a>
                </li>
                <li class="nav-header">管理列表</li>
                <li class="nav-item">
                    <a th:href="@{/user/blog}" th:class="${path}=='blog'?'nav-link active':'nav-link'">
                        <i class="fa fa-list-alt nav-icon" aria-hidden="true"></i>
                        <p>
                            博客管理
                        </p>
                    </a>
                </li>
                <li class="nav-item">
                    <a th:href="@{/user/comments}" th:class="${path}=='comments'?'nav-link active':'nav-link'">
                        <i class="fa fa-comments nav-icon" aria-hidden="true"></i>
                        <p>
                            评论管理
                        </p>
                    </a>
                </li>
<!--                <li class="nav-item">-->
<!--                    <a th:href="@{/user/categories}" th:class="${path}=='categories'?'nav-link active':'nav-link'">-->
<!--                        <i class="fa fa-bookmark nav-icon" aria-hidden="true"></i>-->
<!--                        <p>-->
<!--                            分类管理-->
<!--                        </p>-->
<!--                    </a>-->
<!--                </li>-->
                <li class="nav-item">
                    <a th:href="@{/user/social}" th:class="${path}=='social'?'nav-link active':'nav-link'">
                        <i class="fa fa-comments nav-icon" aria-hidden="true"></i>
                        <p>
                            社交管理
                        </p>
                    </a>
                </li>
<!--                <li class="nav-item">-->
<!--                    <a th:href="@{/user/tags}" th:class="${path}=='tags'?'nav-link active':'nav-link'">-->
<!--                        <i class="fa fa-tags nav-icon" aria-hidden="true"></i>-->
<!--                        <p>-->
<!--                            标签管理-->
<!--                        </p>-->
<!--                    </a>-->
<!--                </li>-->
                <li class="nav-item">
                    <a th:href="@{/user/profile}"
                       th:class="${path}=='profile'?'nav-link active':'nav-link'">
                        <i class="fa fa-user-secret nav-icon"></i>
                        <p>修改密码</p>
                    </a>
                </li>
                <li class="nav-item">
                    <a th:href="@{/user/logout}" class="nav-link">
                        <i class="fa fa-sign-out nav-icon"></i>
                        <p>安全退出</p>
                    </a>
                </li>
            </ul>
        </nav>
        <!-- /.sidebar-menu -->
    </div>
    <!-- /.sidebar -->
</aside>
</html>